package com.guaoran.micro.services.spring.cloud.config.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author : gucheng
 * @Description : <br/>
 * 输出配置项内容
 * @date :2018/12/1 15:13
 */
@RestController
@RefreshScope// 当配置文件修改时，则进行刷新
public class EchoController {

    @Value("${name}")
    private String myName;

    @GetMapping("/my-name")
    public String getName(){
        return myName;
    }

}
